﻿namespace Pottery.FrontEnd.ViewModels
{
    using System;
    using System.ComponentModel.DataAnnotations;
    using System.Web.Mvc;
    using Module;

    public class RecoverPassword
    {
       /* #region Constants

        private const int MAXPasswordLength = 10;

        private const int MAXPLoginLength = 10;

        #endregion Constants

        #region IAssignable members

        public void AssignTo(object obj)
        {
            if (obj is User)
            {
                return;
            }

            throw new NotSupportedException();
        }

        #endregion IAssignable members

        #region Properties

        /// <summary>
        /// User Login
        /// </summary>
        [Display(Name = "Login", ResourceType = typeof(Resources.RecoverPassword))]
        [Required(ErrorMessageResourceName = "LoginErrorMessage", ErrorMessageResourceType = typeof(Resources.RecoverPassword))]
        [DisplayFormat(ConvertEmptyStringToNull = false)]
        [DataType(DataType.Text)]
        [MaxLength(MAXPLoginLength)]
        public string Login { get; set; }

        /// <summary>
        /// User New Password
        /// </summary>
        [Display(Name = "NewPassword", ResourceType = typeof(Resources.RecoverPassword))]
        [Required(ErrorMessageResourceName = "PasswordErrorMessage", ErrorMessageResourceType = typeof(Resources.RecoverPassword))]
        [DisplayFormat(ConvertEmptyStringToNull = false)]
        [DataType(DataType.Password)]
        [MaxLength(MAXPasswordLength)]
        public string NewPassword { get; set; }

        /// <summary>
        /// User Confirm Password
        /// </summary>
        [Display(Name = "ConfirmPassword", ResourceType = typeof(Resources.RecoverPassword))]
        [Required(ErrorMessageResourceName = "ConfirmPasswordErrorMessage", ErrorMessageResourceType = typeof(Resources.RecoverPassword))]
        [DisplayFormat(ConvertEmptyStringToNull = false)]
        [DataType(DataType.Password)]
        [MaxLength(MAXPasswordLength)]
        [Compare("NewPassword", ErrorMessageResourceName = "ValidConfirmPasswordErrorMessage", ErrorMessageResourceType = typeof(Resources.RecoverPassword))]
        public string ConfirmPassword { get; set; }

        #endregion Properties*/
    }
}